<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>添加栏目 - Powered By Betou</title>
<meta name="author" content="Betou Team" />
<meta name="copyright" content="Betou" />
<#include "../head.html"/>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	
	// 表单验证
	$inputForm.validate({
		rules: {
			name:"required",
			userGroup:"required",
			priority:{
				required: true,
				digits: true,
				min:0
			}
		},
	});
	
});
</script>
</head>
<body class="content">
	<div class="path">
		<a href="../index.jspx">首页</a> &raquo; 添加栏目
	</div>
	<form id="inputForm" action="o_save.jspx" method="post"  >
		<table class="input tabContent">
			<tr>
				<th>上级栏目:</th>
				<td>
					<select name="parentId">
						<option value="0" >顶级栏目</option>
						<#if channelList?size gt 0><#assign origDeep=channelList[0]["deep"]+1/></#if>
						<#list channelList as item>
							<option value="${item.id}" >
							<#if item["deep"] gte origDeep><#list origDeep..item["deep"] as i>&nbsp;&nbsp;</#list>></#if>
							${item.name}
							</option>
						</#list>
					</select>
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>栏目名称:</th>
				<td>
					<input type="text" name="name" class="text" maxlength="100" />
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>面向用户:</th>
				<td>
					<#list groupList as g>
						<input type="checkbox" name="userGroup" value="${g.id!}"/>${g.name!}
					</#list>
				</td>
			</tr>
			<tr>
				<th>短信发送:</th>
				<td>
					<#if group??>
						<input type="checkbox" name="smsGroups" value="${group.id}"/><span class="red">${group.name!}</span>
					</#if>
					<#list groupList as g>
						<input type="checkbox" name="smsGroups" value="${g.id}"/>${g.name!}
					</#list>
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>排列顺序:</th>
				<td>
					<input type="text" name="priority" class="text" maxlength="9"  value="10"/>
				</td>
			</tr>
		</table>
		
		<table class="input">
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="确&nbsp;&nbsp;定" />
					<input type="button" class="button" value="返&nbsp;&nbsp;回" onclick="location.href='v_list.jspx'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
